import yaml


class Config(object):
    _dataDict_ = dict()
    def __init__(self, configFile):
        self.configFile = configFile
        with open(self.configFile, 'r', encoding='utf-8') as f:
            self._dataDict_ = next(yaml.full_load_all(f))

    def get_domain(self):
        scheme = 'http://'
        apiPath = '/api/v1/'
        domain = self._dataDict_['Domain']['Ip'] + ':' + str(self._dataDict_['Domain']['Port'])
        return scheme + domain + apiPath